package com.cq.hd.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description: 异常枚举类
 * @author: mYunYu
 * @date: 2021/7/7 15:49
 * @version: v1.0
 */
@AllArgsConstructor
public enum ExceptionEnum {
    UNAUTHORIZED(401, "认证失败"),
    AUTH_TIME_OUT(402, "登录过期，请重新登录"),
    NOT_FOUND(404, "Not Found"),
    INTERNAL_SERVER_ERROR(500, "INTERNAL_SERVER_ERROR"),
    USER_NOT_FOUND(10000, "用户不存在或被封禁，请联系管理员"),
    USER_ACCESS_DENIED(10001, "用户认证失败"),
    LogOut_Faild(10002, "退出失败"),
    USER_MUST_INPUT(10003, "用户名或密码不能为空"),
    USER_PWD_FAILED(10004, "用户名或密码错误"),
    WX_USER_Invalid(10005, "无效的微信用户信息"),
    USER_Mobile_NOT_Exits(10006, "手机号码不存在"),
    USER_PubNum_NOT_Focus(10007, "请先关注公众号"),
    USER_PubNum_NOT_Focus_And_Bind_Mobile(10008, "请先关注公众号，并绑定手机"),
    USER_MUST_Alipay(10009, "请填写支付宝信息"),
    USER_PubNum_Api_Error(10010, "判断用户关注公众号接口异常"),
    USER_Get_Alipay_Error(10011, "无法正常获取用户支付宝信息"),
    USER_Register_Faild(10012, "用户注册失败"),

    Capital_Withdrawable_NOT_Enough(20000, "可提现的余额不足"),
    Capital_CanWithdrawalOne_PerDay(20001, "一天只能提现一次"),
    WX_Mcp_Pay_Err(20002, "微信企业支付到零钱接口异常"),
    Capital_CanPay_Only_Wait(20003, "只能操作待支付的提现"),
    Capital_Withdrawal_NULL(20004, "当前没有可处理的待提现记录"),

    //必输字段校验
    CHECK_MUST_INPUT(22009,"必输字段"),
    //数据库相关异常
    NOT_ALLOW_NULL(30001, "数据不允许为空"),
    RECORD_NOT_FUND(30002,"记录不存在"),

    ILLEGAL_OPERATION(40000, "非法操作"),

    SMS_ALI_CLIENT_ERROR(50001, "阿里云短信服务异常"),
    SMS_CODE_NOT_FOUND(50002, "验证码失效"),
    SMS_CODE_TIME_OUT(50003, "验证码超时"),
    SMS_CODE_RETRY(50004, "验证码尝试次数超出"),
    SMS_CODE_FAILED(50005, "验证码错误"),
    SMS_CODE_CLIENT_FAILED(50005, "验证码归属异常"),
    SMS_SIGN_NOT_FOUND(50007, "签名异常"),


    PARAMETERS_ABNORMAL(110001, "参数异常"),
    ROLE_ABNORMAL(110002, "角色异常"),

    MICRO_SERVICE_UNAVAILABLE(40001,"微服务不可用，请稍后再试");

    @Getter
    private int code;

    @Getter
    private String msg;

}
